import { Component, Input, ViewChild } from '@angular/core';
import { Scroll } from 'ionic-angular';

@Component({
    selector: 'task-detail-page',
    templateUrl: 'page.html'
})
export class TaskDetailPage {

    @Input() uiData: any;
    @Input() configData: any;

    @ViewChild('scroll') scroll: Scroll;

    constructor() { }

    ngAfterViewInit() {

    }

    itemTapped(e) {
        e.target.getElementsByClassName('task-detail')[0].classList.toggle('open');
    }

    lineTapped(e) {
        if (e.target.classList.contains('task-line')) {
            e.target.classList.toggle('open');
        }
    }

}
